package com.shsubway.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shsubway.R;
import com.shsubway.model.QuestionEntity;

import java.util.List;

/**
 * Created by Hu on 2017/3/1.
 */

public class AllQAdapter extends BaseQuickAdapter<QuestionEntity, BaseViewHolder> {
    public AllQAdapter(int layoutResId, List<QuestionEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, QuestionEntity item) {
        helper.setText(R.id.ques_con, item.getQstcontent())
                .setBackgroundRes(R.id.e_c_h, item.getEasyconhardtype() == 0 ? R.mipmap.easy : item.getEasyconhardtype() == 1 ? R.mipmap.comm : R.mipmap.heard);
    }
}
